package org.jeecg.modules.demo.seal.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.seal.entity.Car;
import org.jeecg.modules.demo.seal.entity.CarBrandModel;
import org.jeecg.modules.demo.seal.entity.authOrg;
import org.jeecg.modules.demo.seal.mapper.CarMapper;
import org.jeecg.modules.demo.seal.service.ICarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@DS("multi-datasource2")
public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarService {

    @Autowired
    private CarMapper carMapper;

    public List<Long> getOrgIds(String orgCode){
        return carMapper.getOrgIds(orgCode);
    }

    public Long getOrgId(String orgCode){
        return carMapper.getOrgId(orgCode);
    }

    public CarBrandModel getBrandModel(long brandModelId){
        return carMapper.getBrandModel(brandModelId);
    }

    public String getDepartName(Integer orgId){
        return carMapper.getDepartName(orgId);
    }

    public List<authOrg> getOrg(String orgName){
        return carMapper.getOrg(orgName);
    }
}
